local t = Def.ActorFrame {};

t[#t+1] = Def.ActorFrame {
	LoadActor("_battlediff") .. {
		InitCommand=cmd(x,Center1Player() and SCREEN_CENTER_X or THEME:GetMetric(Var "LoadingScreen","PlayerP1MiscX");y,SCREEN_BOTTOM+40;draworder,101;horizalign,center;zoom,0.5;);
		OnCommand=cmd(playcommand,"Set";sleep,0.4;decelerate,0.3;y,SCREEN_BOTTOM-32;sleep,3;);
		OffCommand=cmd(sleep,0.6;decelerate,0.5;addy,73;);
	};
	LoadFont("StepsDisplay description") .. { 
          InitCommand=cmd(x,Center1Player() and SCREEN_CENTER_X+65 or THEME:GetMetric(Var "LoadingScreen","PlayerP1MiscX")+65;y,SCREEN_BOTTOM+40;draworder,101;horizalign,left;);
		  OnCommand=cmd(playcommand,"Set";sleep,0.4;zoom,0.75;decelerate,0.3;y,SCREEN_BOTTOM-32;sleep,3;);
          CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set";); 
		  TransitionCommand=cmd(finishtweening;diffusealpha,0;addy,-3;smooth,0.2;diffusealpha,1;addy,3;);
		  PlayerJoinedMessageCommand=cmd(playcommand,"Set";diffusealpha,0;smooth,0.3;diffusealpha,1;);
          ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set"); 
		  OffCommand=cmd(sleep,0.6;decelerate,0.5;addy,73;);
          SetCommand=function(self)
			stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
			local song = GAMESTATE:GetCurrentSong();
			if song then 
				if stepsP1 ~= nil then
					local st = stepsP1:GetStepsType();
					local diff = stepsP1:GetDifficulty();
					local cd = GetCustomDifficulty(st, diff);
					self:settext(stepsP1:GetMeter())
					self:diffuse(ColorLightTone(CustomDifficultyToColor(cd)));
					self:strokecolor(ColorDarkTone(CustomDifficultyToColor(cd)));
				else
					self:settext("")
				end
			else
				self:settext("")
			end
          end	
	};

	LoadFont("StepsDisplay description") .. { 
          InitCommand=cmd(x,Center1Player() and SCREEN_CENTER_X-76 or THEME:GetMetric(Var "LoadingScreen","PlayerP1MiscX")-76;y,SCREEN_BOTTOM+40;draworder,101;horizalign,left;);
		  OnCommand=cmd(playcommand,"Set";sleep,0.4;zoom,0.75;decelerate,0.3;y,SCREEN_BOTTOM-32;sleep,3;);
          CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set";); 
		  TransitionCommand=cmd(finishtweening;diffusealpha,0;addy,-3;smooth,0.2;diffusealpha,1;addy,3;);
		  OffCommand=cmd(sleep,0.6;decelerate,0.5;addy,73;);
		  PlayerJoinedMessageCommand=cmd(playcommand,"Set";diffusealpha,0;smooth,0.3;diffusealpha,1;);
          ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set"); 
          SetCommand=function(self)
			stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
			local song = GAMESTATE:GetCurrentSong();
			if song then 
				if stepsP1 ~= nil then
					local st = stepsP1:GetStepsType();
					local diff = stepsP1:GetDifficulty();
					local cd = GetCustomDifficulty(st, diff);
					self:settext(THEME:GetString("CustomDifficulty",ToEnumShortString(diff)));
					self:diffuse(ColorLightTone(CustomDifficultyToColor(cd)));
					self:strokecolor(ColorDarkTone(CustomDifficultyToColor(cd)));
				else
					self:settext("")
				end
			else
				self:settext("")
			end
          end
	};
	};
	
	t[#t+1] = Def.ActorFrame {
	LoadActor("_battlediff") .. {
        InitCommand=cmd(x,Center1Player() and SCREEN_CENTER_X or THEME:GetMetric(Var "LoadingScreen","PlayerP2MiscX");y,SCREEN_BOTTOM+40;draworder,101;horizalign,center;zoom,0.5;);
		OnCommand=cmd(playcommand,"Set";sleep,0.4;decelerate,0.3;y,SCREEN_BOTTOM-32;sleep,3;);
		OffCommand=cmd(sleep,0.6;decelerate,0.5;addy,73;);
	};
	LoadFont("StepsDisplay description") .. { 
          InitCommand=cmd(x,Center1Player() and SCREEN_CENTER_X+65 or THEME:GetMetric(Var "LoadingScreen","PlayerP2MiscX")+65;y,SCREEN_BOTTOM+40;draworder,101;horizalign,left;);
		  OnCommand=cmd(playcommand,"Set";sleep,0.4;zoom,0.75;decelerate,0.3;y,SCREEN_BOTTOM-32;sleep,3;);
          CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set";); 
		  TransitionCommand=cmd(finishtweening;diffusealpha,0;addy,-3;smooth,0.2;diffusealpha,1;addy,3;);
		  PlayerJoinedMessageCommand=cmd(playcommand,"Set";diffusealpha,0;smooth,0.3;diffusealpha,1;);
          ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set"); 
		  OffCommand=cmd(sleep,0.6;decelerate,0.5;addy,73;);
          SetCommand=function(self)
			stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
			local song = GAMESTATE:GetCurrentSong();
			if song then 
				if stepsP2 ~= nil then
					local st = stepsP2:GetStepsType();
					local diff = stepsP2:GetDifficulty();
					local cd = GetCustomDifficulty(st, diff);
					self:settext(stepsP2:GetMeter())
					self:diffuse(ColorLightTone(CustomDifficultyToColor(cd)));
					self:strokecolor(ColorDarkTone(CustomDifficultyToColor(cd)));
				else
					self:settext("")
				end
			else
				self:settext("")
			end
          end	
	};

	LoadFont("StepsDisplay description") .. { 
          InitCommand=cmd(x,Center1Player() and SCREEN_CENTER_X-76 or THEME:GetMetric(Var "LoadingScreen","PlayerP2MiscX")-76;y,SCREEN_BOTTOM+40;draworder,101;horizalign,left;);
		  OnCommand=cmd(playcommand,"Set";sleep,0.4;zoom,0.75;decelerate,0.3;y,SCREEN_BOTTOM-32;sleep,3;);
          CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set";); 
		  TransitionCommand=cmd(finishtweening;diffusealpha,0;addy,-3;smooth,0.2;diffusealpha,1;addy,3;);
		  OffCommand=cmd(sleep,0.6;decelerate,0.5;addy,73;);
		  PlayerJoinedMessageCommand=cmd(playcommand,"Set";diffusealpha,0;smooth,0.3;diffusealpha,1;);
          ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set"); 
          SetCommand=function(self)
			stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
			local song = GAMESTATE:GetCurrentSong();
			if song then 
				if stepsP2 ~= nil then
					local st = stepsP2:GetStepsType();
					local diff = stepsP2:GetDifficulty();
					local cd = GetCustomDifficulty(st, diff);
					self:settext(THEME:GetString("CustomDifficulty",ToEnumShortString(diff)));
					self:diffuse(ColorLightTone(CustomDifficultyToColor(cd)));
					self:strokecolor(ColorDarkTone(CustomDifficultyToColor(cd)));
				else
					self:settext("")
				end
			else
				self:settext("")
			end
          end
	};
	};

	-- I hope this works
	t[#t+1] = LoadFont("StepsDisplay description") .. { 
          InitCommand=cmd(x,SCREEN_CENTER_X-240;y,SCREEN_TOP-40;draworder,101;horizalign,left;);
		  OnCommand=cmd(playcommand,"Set";sleep,0.4;zoom,0.75;decelerate,0.3;y,SCREEN_TOP+32;sleep,3;);
		  PlayerJoinedMessageCommand=cmd(playcommand,"Set";diffusealpha,0;smooth,0.3;diffusealpha,1;);
          ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set"); 
		  OffCommand=cmd(sleep,0.6;decelerate,0.5;addy,-73;);
          SetCommand=function(self)
			self:strokecolor(color("#000000"))
			chara = GAMESTATE:GetCharacter(PLAYER_1)
			local song = GAMESTATE:GetCurrentSong();
				if chara ~= nil then
					if chara:GetDisplayName() == "default" then
					self:settext("Anonymous Pony")
					else
					self:settext(chara:GetDisplayName())
					end;
				else
					self:settext("")
				end
          end	
	};
	t[#t+1] = Def.Sprite {
		Name="p1character",
        InitCommand=cmd(x,SCREEN_CENTER_X-283;y,SCREEN_TOP+26;draworder,101;horizalign,center;zoom,0.5;);
		OnCommand=cmd(playcommand,"Set";diffusealpha,0;zoom,0.4;sleep,0.7;decelerate,0.2;zoom,0.5;diffusealpha,1;);
		OffCommand=cmd(sleep,0.6;smooth,0.3;addy,-60;);
		SetCommand=function(self)
			local chariconp1 = chara:GetDisplayName()
			if FILEMAN:DoesFileExist("Themes/"..THEME:GetCurThemeName().."/Graphics/charicons/"..chariconp1.." icon.png") then
				self:Load(THEME:GetPathG("","charicons/"..chariconp1.." icon"))
			else
				self:Load(THEME:GetPathG("","charicons/default icon"))
			end
		end
	}
	t[#t+1] = LoadFont("StepsDisplay description") .. { 
          InitCommand=cmd(x,SCREEN_CENTER_X+240;y,SCREEN_TOP-40;draworder,101;horizalign,right;);
		  OnCommand=cmd(playcommand,"Set";sleep,0.4;zoom,0.75;decelerate,0.3;y,SCREEN_TOP+32;sleep,3;);
		  PlayerJoinedMessageCommand=cmd(playcommand,"Set";diffusealpha,0;smooth,0.3;diffusealpha,1;);
          ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set"); 
		  OffCommand=cmd(sleep,0.6;decelerate,0.5;addy,-73;);
          SetCommand=function(self)
			self:strokecolor(color("#000000"))
			charap2 = GAMESTATE:GetCharacter(PLAYER_2)
			local song = GAMESTATE:GetCurrentSong();
				if charap2 ~= nil then
					if charap2:GetDisplayName() == "default" then
					self:settext("Anonymous Pony")
					else
					self:settext(charap2:GetDisplayName())
					end;
				else
					self:settext("")
				end
          end	
	};
	t[#t+1] = Def.Sprite {
		Name="p2character",
        InitCommand=cmd(x,SCREEN_CENTER_X+283;y,SCREEN_TOP+26;draworder,101;horizalign,center;zoom,0.5;);
		OnCommand=cmd(playcommand,"Set";diffusealpha,0;zoom,0.4;sleep,0.7;decelerate,0.2;zoom,0.5;diffusealpha,1;);
		OffCommand=cmd(sleep,0.6;smooth,0.3;addy,-60;);
		SetCommand=function(self)
			local chariconp2 = charap2:GetDisplayName()
			if FILEMAN:DoesFileExist("Themes/"..THEME:GetCurThemeName().."/Graphics/charicons/"..chariconp2.." icon.png") then
				self:Load(THEME:GetPathG("","charicons/"..chariconp2.." icon"))
			else
				self:Load(THEME:GetPathG("","charicons/default icon"))
			end
		end
	}
return t